// 版权归 瞄你个汪 所有。使用本代码应遵守相关法律法规和Apache 2.0开源许可要求。
package top.geeke.entity;

import top.geeke.eunm.SysTaskStatusEnum;
import top.geeke.entity.base.EntityBaseId;
import top.geeke.toolkit.supertable.annotation.SuperColumn;
import top.geeke.toolkit.supertable.annotation.SuperTable;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

/**
 * <p>
 * 系统定时任务表
 * </p>
 * @author 瞄你个汪
 * @since 2024-05-01 12:00:00
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "sys_schedule_task")
@SuperTable(value = "系统定时任务表", isSystem = true)
public class SysScheduleTask extends EntityBaseId implements Serializable {
    private static final long serialVersionUID = 1L;

    @SuperColumn(value = "任务ID")
    private Long taskId;

    @SuperColumn(value = "任务名称", length = 64)
    private String taskName;

    @SuperColumn(value = "执行规则", length = 32)
    private String taskCron;

    @SuperColumn(value = "任务状态")
    private SysTaskStatusEnum taskStatus;

    @SuperColumn(value = "任务参数", nullable = true)
    private String taskParams;

    @SuperColumn(value = "脚本ID", nullable = true)
    private Long scriptId;

    @SuperColumn(value = "任务描述", nullable = true, length = 128)
    private String desc;

    @JsonIgnore
    @JsonIgnoreProperties
    @SuperColumn(value = "应用ID")
    @TableField(fill = FieldFill.INSERT)
    private Long appId;
}
